# -*-encoding: utf-8 -*-
import tools


def test_wb_company_info():

    tools.update_wb_company_info('无锡惠成信息技术有限公司',
                                 '91320481559285641A',
                                 '32028223',
                                 '江苏省溧阳市南渡镇五星大道1号8818室',
                                 '孙文浩',
                                 '13818618888',
                                 '马新保',
                                 '18951563030',
                                 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1543477248039&di=8e2db248127a5eababb1231d2522f237&imgtype=0&src=http%3A%2F%2Fdocs.ebdoor.com%2FImage%2FCompanyCertificate%2F22%2F226523.jpg',
                                 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1543477248039&di=8e2db248127a5eababb1231d2522f237&imgtype=0&src=http%3A%2F%2Fdocs.ebdoor.com%2FImage%2FCompanyCertificate%2F22%2F226523.jpg',
                                 '无锡市梁溪区时代上城A区16幢1楼',
                                 '32', '3202', '320213', '32021316',
                                 '18014833577',
                                 '虞水彬',
                                 '13775261838')


def test_register_wb_person():
    lis = [
        {
            'user_name': '孟庆玉',
            'phone': '18014756575',
            'card_id': '320382198802169230',
            # 't1_card_no': '320382198802169230',
            # 't1_card_file': 'www.africle.xyz:8088/uploaded/WechatIMG78.jpeg',
            # 't1_end_time': '2022-02-02',
            't2_card_no': '320382198802169230',
            't2_card_file': 'http://www.africle.xyz:8088/uploaded/t2',
            't2_end_time': '2021-07-03',
            'user_status': '在职',
            'contract_start_time': '2017-01-01',
            'contract_end_time': '2019-06-30',
            'contract_file': 'http://www.africle.xyz:8088/uploaded/contract_01012',
            'social_card_file': 'http://www.africle.xyz:8088/uploaded/social_121221'
        }
    ]
    tools.register_wb_person(lis)


def test_wb_contract_info():

    tools.update_wb_contract_info([
        {
         # 'contract_id': '10001',
         'contract_name': u'上城项目B区电梯维修保养合同',
         'contract_no': u'甲-工程-WX-SDSC-18-111',
         'dev_code': '30103202012001111018',
         'dev_name': u'S_LIFT113',
         'dev_property': u'商品房小区',
         'end_time': '2018-12-31',
         'file': 'http://www.africle.xyz:8088/uploaded/299F80D3.jpg',
         'maintenance_cycle': 15,
         'start_time': '2018-01-01',
        # 'user_company_name': u'时代上城B区'
        }
    ])


def test_query_comfirm_info():
    tools.query_maintainance_confirm_info(
        '10000',
        '维保人员'
    )


def test_bind_lift_person_info():
    tools.bind_lift_person_info([
        {
            'dev_code': '1000',
            'certificate_id': '320902197812067015',
            'user_type': '维保人员',
            'operation_type': '',
        }
    ])


def test_new_wb_mission():
    tools.new_wb_mission([
        {
            'dev_code': '1000',
            'end_time': '2018-12-27',
        }
    ])


def test_get_wb_mission():
    tools.get_wb_mission(
        '10000',
        '320902197812067015'
    )


def test_begin_wb_info():
    tools.begin_wb_info('111')



def test_end_wb_info():
    tools.end_wb_info('111',
                      '半月',
                      '320902197812067015',
                      'www.africle.xyz:8088/uploaded/WechatIMG78.jpeg',
                      'www.africle.xyz:8088/uploaded/WechatIMG78.jpeg',
                      '需物业配合事项',
                      '照片',
                      '电梯门',
                      '电梯门自动感应装置',
                      '正常',
                      '维保照片',
                      'www.africle.xyz:8088/uploaded/WechatIMG78.jpeg',
                      '层站')


def test_estate_confirm_info():
    tools.estate_confirm_info('111',
                              'www.africle.xyz:8088/uploaded/WechatIMG78.jpeg',
                              '服务良好')



